package com.wu.controller;

import com.wu.pojo.model.ReportLabelModel;
import com.wu.response.CommonReturnType;
import com.wu.service.ReportLabelService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author: 吴磊
 * @program: blog
 * @create: 2021-05-12 14:35
 */
@RestController
@Api(tags = "举报有关接口")
@RequestMapping(value = "/report")
public class ReportController {
    @Autowired
    private ReportLabelService reportLabelService;

    @ApiOperation("获取所有的举报标签")
    @RequestMapping(value = "/getAllReportLabels", method = RequestMethod.POST)
    public CommonReturnType getAllReportLabel() {
        List<ReportLabelModel> allReportLabel = reportLabelService.getAllReportLabel();
        return CommonReturnType.create(allReportLabel);
    }

}
